<%@page import="jpa.entities.Project"%>
<jsp:useBean id="user" class="jsp.classes.Session" scope="session"/>
<%
    String join = "";
    for (Project p : user.getEmployee().getProjects()) {
        join += ",\"" + p.getTitle().replace(" ", "").toLowerCase() + "@conference.zvlwab.nl\"";
    }
    join = join.substring(1);
%>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="styles/candy.css" />
        <script type="text/javascript" src="scripts/jquery.js"></script>
        <script type="text/javascript" src="scripts/candy/libs.js"></script>
        <script type="text/javascript" src="scripts/candy/candy.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                Candy.init('http://zvlwab.nl:5280/http-bind/', {
                    core: {
                        debug: true,
                        autojoin: [<%=join%>] },
                    view: { resources: 'styles/' }
                });
                Candy.Core.connect("zvlwab.nl");
            });
        </script>
    </head>
    <body>
        <div id="candy"></div>
    </body>
</html>
